package com.example.demo.controller;

import com.example.demo.service.sv.yinsi;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;


@Controller
@RequestMapping("yinsi")
public class yinsicontroller {

    @Autowired
     yinsi yinsi;
    @RequestMapping("zhanji")
    @ResponseBody
    public String chazhanji(@RequestParam("zhang") String zhang)
     {
      return yinsi.chazhanji(zhang);
     }

     @RequestMapping("dengji")
    @ResponseBody
    public void updatedengji(@RequestParam("zhang") String zhang,@RequestParam("jingyan") int jingyan){
        yinsi.updatedengji(zhang,jingyan);
     }
    @RequestMapping("jifen")
    @ResponseBody
    public void updatejifen(@RequestParam("zhang") String zhang,@RequestParam("jifen") int jifen){
        yinsi.updatedengji(zhang,jifen);
    }

}
